From 5ffc0826ed2e15738ce2e7e16a70d85a8e226c18 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 10 Feb 2006 19:19:54 +0000 Subject: [PATCH] Guard against NULL. (#330177, Raphael Slinckx) 2006-02-10 Matthias Clasen * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): Guard against NULL. (#330177, Raphael Slinckx) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkentrycompletion.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1ccabd795a..0e1bbd6ebd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-10 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): + Guard against NULL. (#330177, Raphael Slinckx) + 2006-02-10 Murray Cumming * docs/reference/gtk/tmpl/gtkcomboboxentry.sgml: Mention that diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1ccabd795a..0e1bbd6ebd 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-02-10 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): + Guard against NULL. (#330177, Raphael Slinckx) + 2006-02-10 Murray Cumming * docs/reference/gtk/tmpl/gtkcomboboxentry.sgml: Mention that diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 7ebfe5b1eb..e9e923869b 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1488,7 +1488,7 @@ gtk_entry_completion_match_selected (GtkEntryCompletion *completion, gchar *str = NULL; gtk_tree_model_get (model, iter, completion->priv->text_column, &str, -1); - gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), str); + gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), str ? str : ""); /* move cursor to the end */ gtk_editable_set_position (GTK_EDITABLE (completion->priv->entry), -1); -- 2.30.2